@extends('backend/layouts/default')
@section('title')
Tạo danh mục từ điển
@stop
@section('content')
<h3 style="text-align: center"><span class="glyphicon glyphicon-pencil"></span> Tạo danh mục từ điển</h3>
<form class="form-horizontal" action="" method="post" accept-charset="utf-8" role="form">
    {{ Form::token() }}
    <input type="hidden" name="" value=""/>

    <div class="row">
        <div class="col-md-9">
            <div class="form-group ">
                <label class="control-label col-sm-4" for="title">
                    Tiêu đề : * 
                </label>

                <div class="col-sm-8">
                    <input class="form-control" type="text" name='data[Category][title]' id="" value=""/>


                    @if(Session::has('error_create_category'))

                    <?php
                    echo '<span class="help-inline">Tiêu đề đã tồn tại</span>';
                    Session::forget('error_create_category');
                    ?>


                    @endif
                </div>
            </div>  

            <div class="form-group">
                <label class="control-label col-sm-4">Chọn danh mục cha:</label>

                <div class="col-sm-8">
                    <?=
                    Form::select('data[Category][category_id]', $data['categories'], null, array('class' => 'form-control'))
                    ?>
                </div>
            </div> 
            <div class="form-group">
                <label class="control-label col-sm-4">Trạng thái </label>

                <div class="col-sm-8">

                    <?= Form::Select('data[Category][status]', $data['status'], null, array('class' => 'form-control'))
                    ?>
                </div>
            </div> 
            <div class="control-group" align="right">
                <div class="controls">
                    <a class="btn btn-link" href="{{route('dictionaries/categories')}}">Hủy</a>
                    <button type="submit" class="btn btn-success">Tạo</button>
                </div>
            </div>
        </div>
    </div>
</form>
<link href="{{ asset('assets/commons/css/autocomplete.css')}}" rel="stylesheet"/>
<script type="text/javascript" src="{{ asset('assets/commons/js/jquery.mockjax.js')}}"></script>
<script type="text/javascript" src="{{ asset('assets/commons/js/jquery.autocomplete.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/commons/js/lyric.autocomplete.js') }}"></script>
@stop